<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableTransportation extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //出差表
        Schema::create('transportation', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id');
            $table->string('mobile');
            $table->dateTime('riding_time')->comment('乘车时间');
            $table->string('order_no')->comment('订单号');
            $table->string('origin')->comment('出发地');
            $table->string('destination')->comment('目的地');
            $table->decimal('total_price')->comment('总金额');
            $table->decimal('distance')->comment('距离');
            $table->integer('duration')->comment('时长');
            $table->string('city');
            $table->string('note')->comment('备注');
            $table->string('additional')->comment('补充说明');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('transportation');
    }
}
